﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApplication1
{
    public class BankAccountDB
    {
       



        public List<BankAccount> SelectProfileBank(string bankName, int userID)
        {
            List<BankAccount> getBankP = new List<BankAccount>();
            List<BankAccount> bankAccounts = MainWindow.db.BankAccounts.Where(acc => acc.BankName == bankName && acc.UserID == userID).ToList();
            foreach (BankAccount acc in bankAccounts)
            {
                getBankP.Add(acc);

            }
            return getBankP;

        }
        public List<BankAccount> SelectBanks(int userId)
        {
            List<BankAccount> getBanks = new List<BankAccount>();
            List<BankAccount> bankAccounts = MainWindow.db.BankAccounts.Where(acc => acc.UserID == userId).ToList();
            foreach (BankAccount acc in bankAccounts)
            {
                getBanks.Add(acc);

            }
            return getBanks;
        }
    }
}
